//
//  EwmImgVc.swift
//  GjCup
//
//  Created by abc on 2024/4/9.
//

import UIKit

class EwmImgVc: UIViewController {
    var content = ""
    
    @IBOutlet weak var ewmImg: UIImageView!
    
    @IBOutlet weak var sBtn: UIButton!{
        didSet{
            sBtn.layer.cornerRadius = 6
        }
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        ewmImg.image = EWMManager.generateQRCode(with: content, size: 240)

        
    }
    
    @IBAction func saveAc(_ sender: UIButton) {
        guard let image = ewmImg.image else { return  }
        UIImageWriteToSavedPhotosAlbum(image, nibName, nil, nil)
        UIAlertController.ok_alert("二维码已保存，请前往相册查看", self)
        
    }
    
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
